import sys 
import os.path

from aria_tests import make_element_test, make_group_index_file, make_all_index_file

from role_checkbox_tests  import checkbox_tests
from role_button_tests    import button_tests
  
all_files = []

# Make checkbox tests
i = 1;
group_files = []
path = "checkbox/"
for test in checkbox_tests:
   num = str(i).zfill(3)
   role = test['role'] 
   id = "id_role_" + role + "_" + num
   title = "Test " + str(i) + " for role " + role
   fname = role + "_" + num
   result_file = make_element_test( id, title, path, fname, test )
   group_files.append(result_file)
   all_files.append(path+result_file)
   i += 1
make_group_index_file( path, group_files, "ARIA Role Checkbox Tests" )

# Make button tests
i = 1;
group_files = []
path = "button/"
for test in button_tests:
   num = str(i).zfill(3)
   role = test['role'] 
   id = "id_role_" + role + "_" + num
   title = "Test " + str(i) + " for role " + role
   fname = role + "_" + num
   result_file = make_element_test( id, title, path, fname, test )
   group_files.append(result_file)
   all_files.append(path+result_file)
   i += 1
make_group_index_file( path, group_files, "ARIA Role Button Tests" )

# Make maser index file
make_all_index_file( all_files, "ARIA Test Results" )
  
  


